package dletc.job.job04;

public class MyDate {
	
	/*2.请根据以下代码自行定义能满足需要的MyDate类,在MyDate类中覆盖 equals方法，
	使其判断当两个MyDate类型对象的年月日都相同时，结果 为true，否则为false。
	public boolean equals(Object o)*/
	
	private int year;
	private int month;
	private int day;
	
	public MyDate() {

	}
	
	public MyDate(int year, int month, int day) {
		super();
		this.year = year;
		this.month = month;
		this.day = day;
	}


	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		MyDate other = (MyDate) obj;
		if (day != other.day)
			return false;
		if (month != other.month)
			return false;
		if (year != other.year)
			return false;
		return true;
	}
	
	
	

}
